import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/SelectRepayItem.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/NavigationBar.dart';
import 'package:heyangkuaidai/DemonStrateModule/LoanSendApplyPage.dart';
class LoanSelfHelpSendPage extends StatefulWidget {
  @override
  _LoanSelfHelpSendPageState createState() => _LoanSelfHelpSendPageState();
}

class _LoanSelfHelpSendPageState extends State<LoanSelfHelpSendPage> {
  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 375, height: 667, allowFontScaling: true);
    return Scaffold(
      resizeToAvoidBottomInset: false,
      body: Column(
        children: [
          SizedBox(height: MediaQuery.of(context).padding.top,),
          NavigationBar(false, title: "自助放款",),
          Container(
            width: ScreenUtil.screenWidth,
            height: ScreenUtil.screenHeight-ScreenUtil().setWidth(320)-MediaQuery.of(context).padding.top,
            child: ListView.separated(
              // ignore: missing_return
              itemBuilder: (context, itemIndex){
                Map infosMap = new Map();
                infosMap['topleft'] = '￥200,000.00';
                infosMap['bottomleft'] = '合同额度';
                infosMap['topRight'] = '业务编号：3401 **** **** *391 9';
                infosMap['centerRight'] = '剩余额度：￥100,000.00';
                infosMap['bottomRight'] = '贷款银行：益阳农商银行';
                print(infosMap);
                return InkWell(
                  onTap: (){
                     Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) => new LoanSendApplyPage(),
                  ),
                );
                  },
                  child:SelectRepayItem(infoMap: infosMap,) ,
                );
                // ignore: missing_return
              },separatorBuilder: (context, itemIndex){
              return Container(height: ScreenUtil().setWidth(20),);
            }, itemCount: 1,
              padding: EdgeInsets.only(top:ScreenUtil().setWidth(20),left: ScreenUtil().setWidth(15),right: ScreenUtil().setWidth(15)),),
          ) ,

        ],
      ),
    );
  }
}
